﻿using System.ComponentModel.DataAnnotations;

namespace TaskManager.Web.ViewModels.Task
{
    /// <summary>
    /// Edit Task Model
    /// </summary>
    public class TaskEditModel
    {
        /// <summary>
        /// Task unique identifier
        /// </summary>
        public int Id { get; set; }

        [Required]
        [StringLength(100)]
        public string Summary { get; set; }

        /// <summary>
        /// Task description
        /// </summary>
        [DataType(DataType.MultilineText)]
        public string Description { get; set; }

        /// <summary>
        /// Assignee
        /// </summary>
        [Required]
        public string Assignee { get; set; }

        /// <summary>
        /// Owner
        /// </summary>
        [Required]
        public string Owner { get; set; }

        /// <summary>
        /// Priority (0..4)
        /// </summary>
        [Required]
        [RegularExpression("[0-4]")]
        public int Priority { get; set; }

        /// <summary>
        /// Parameterless constructor
        /// </summary>
        public TaskEditModel()
        {

        }
    }
}